<template>
	<view class="practice_hearder">
		<image @click="back" src="../static/icon/back.png"></image>
		<text>{{title}}</text>
		<view class="image2" >
			<image :src="handles" mode="widthFix" v-if="iSshow" @click="clickEvent" ></image>
		</view>
		<!-- 添加一个按钮 可传src的 -->
	</view>
</template>

<script>
	export default {
	props: {
		title: String,
		handles: String ,
		iSshow: false
	},
	methods:{
		clickEvent (){
			this.$emit('clickEvent')
		},
		back () {
			this.$emit('back')
		}
		
	}
	}
</script>

<style lang="scss">
	.practice_hearder {

		position: relative;
		width: 100%;
		height: 100rpx;
		background-color: white;
		line-height: 100rpx;
		border-bottom: 1px solid #e5e4e8;
		image {
			height: 50rpx;
			width: 50rpx;
			left: 18rpx;
			top: 26rpx;
			position: absolute;
		}
		text {
			color: black;
			font-size: 18px;
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
		}
		.image2 {
			padding: 0rpx;
			position: absolute;
			height: 50rpx;
			width: 50rpx;
			right: 38rpx;
			// top: 26rpx;
		}
		.image2 image {
			height: 40rpx;
			width: 40rpx;
			}
	}
</style>
